﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TableRelation.aspx.cs" Inherits="ReportsFactory.TableRelation" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Select Relation</title>
    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <link href="Styles/Site.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
        function btnOK_Click()
        {
            var colNames = window.dialogArguments;
            colNames.srcCol = $("#ddlSourceColumn option:selected").text();
            colNames.tgtCol = $("#ddlTargetColumn option:selected").text();
            window.returnValue = colNames;
            window.close();
        }

        function btnCancel_Click()
        {
            window.returnValue = null;
            window.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="100%">
        <tr>
            <td width="50%">
                <asp:Panel GroupingText="Source" runat="server" ID="panelSource">
                    <asp:Label ID="lblSourceTable" runat="server" />
                    <br />
                    <asp:DropDownList ID="ddlSourceColumn" runat="server" />
                </asp:Panel>
            </td>
            <td width="50%">
                <asp:Panel GroupingText="Target" runat="server" ID="panelTarget">
                    <asp:Label ID="lblTargetTable" runat="server" />
                    <br />
                    <asp:DropDownList ID="ddlTargetColumn" runat="server" />
                </asp:Panel>
            </td>
        </tr>

        <tr>
            <td align="center" colspan="2">
            &nbsp;
            </td>
        </tr>

        <tr>
            <td align="center" colspan="2">
                <input id="btnOK" class="btn" type="button" value="OK" onclick="javascript:btnOK_Click();" tabindex="1" />
                &nbsp;
                <input id="btnCancel" class="btn" type="button" value="Cancel" onclick="javascript:btnCancel_Click();"
                    tabindex="2" /></td>
        </tr>
        
        </table>
    </div>
    </form>
</body>
</html>
